using System;
using UnityEngine;
using Object = UnityEngine.Object;

namespace LeeFramework.ResourcesService
{
    public interface IResources
    {
        public T Load<T>(string path, bool isCache = true) where T : Object;

        public ResourcesTask LoadAsync<T>(string path, Action<bool, T> cb = null, bool isCache = true) where T : Object;

        public GameObject Instantiate(string path, Transform parent = null, bool isCache = true);

        public ResourcesTask InstantiateAsync(string path, Action<bool, GameObject> cb = null, Transform parent = null,  bool isCache = true);

        public void Unload(string path);

        public void UnloadUnusedAssets(Action<bool, float> cb = null);
    }
}